#include <iostream>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <cstdio>
const char* terimal = "/dev/pts/5";
int OpenTerimal()
{
    int fd = open(terimal, O_WRONLY);
    if(fd == -1)
    {
        // std::cerr << "open terimal fail" << std::endl;
        perror("open terimal fail");
        return 1;
    }
    dup2(fd, 2);
    close(fd);
    return 0;
}